<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<TITLE>Quản lý tìm kiếm</TITLE>
	<style>
.item2 {
	background: #015AC3 !important;
}
</style>

</h:head>
<h:body>
	<p:ajaxStatus
		style="bottom: 68%;
				    height: 32px;
				    position: fixed;
				    right: 50%;
				    width: 32px;
				    z-index: 99999;">
		<f:facet name="start">
			<p:graphicImage value="image/loading.gif" />
		</f:facet>

		<f:facet name="complete">
			<h:outputText value="" />
		</f:facet>
	</p:ajaxStatus>
	<ui:include src="admin_header.xhtml"></ui:include>

	<div class="main">
		<p:growl id="msgg"></p:growl>

		<div style="float: left; width: 100%; margin-bottom: 10px;">
			<h:form>
				<p:commandLink actionListener="#{adminBean.reset}" update=":v100_form:main_panel"
					onclick="dgl_insertv100src.show();">
					<img src="image/add.png"></img>
				</p:commandLink>
				<label>Thêm website vào hệ thống tìm kiếm</label>
			</h:form>


		</div>
		<h:panelGroup id="form">
			<div style="float: left; width: 100%;">
				<p:dataTable rowIndexVar="row" var="item"
					value="#{adminBean.listV100Src}">
					<p:column headerText="Stt" style="text-align:center;width:3%;">
						<h:outputText value="#{row+1}" />
					</p:column>
					<p:column headerText="Url">
						<h:outputText value="#{item.vv101}" />
					</p:column>
					<p:column headerText="Chức năng"
						style="text-align:center;width:10%;">
						<h:form rendered="#{item.hasContent==false}">
							<p:commandLink onclick="dgl_insertv100src.show()" update=":v100_form:main_panel"
								actionListener="#{adminBean.onClickUpdateV100(item.pv100,item.vv101)}">
								<img src="image/24.png"></img>
							</p:commandLink>
							<p:commandLink onclick="dgl_delV100.show()" actionListener="#{adminBean.onClickUpdateV100(item.pv100,item.vv101)}">
								<img src="image/25.png"></img>
							</p:commandLink>
						</h:form>
					</p:column>
				</p:dataTable>
			</div>
		</h:panelGroup>
	</div>
	<ui:include src="template/footer.xhtml"></ui:include>
	<h:form id="v100_form">
		<p:dialog widgetVar="dgl_insertv100src" id="form_input_h075"
			width="500" resizable="false" header="Thêm website">
			<h:panelGroup id="main_panel">
				<div class="form-feild">
					<div class="feild-left-large">
						<div class="feild-input">
							<label>Url (*)</label>
							<h:inputText style="width:372px;" value="#{adminBean.url}"></h:inputText>
						</div>
					</div>
					<div class="btnINS">
						<p:commandButton value="Lưu"
							actionListener="#{adminBean.insertV100Src}" update=":msgg,:form"
							oncomplete="dgl_insertv100src.hide();"></p:commandButton>
						<p:commandButton value="Đóng" onclick="dgl_insertv100src.hide();"></p:commandButton>
					</div>
				</div>
			</h:panelGroup>
		</p:dialog>
	</h:form>
	<h:form>
		<p:confirmDialog widgetVar="dgl_delV100" header="Xóa website" message="Bạn có chắc chắn muốn xóa?">
			<div class="btnINS">
						<p:commandButton value="Lưu"
							actionListener="#{adminBean.deleteV100}" update=":msgg,:form"
							oncomplete="dgl_delV100.hide();"></p:commandButton>
						<p:commandButton value="Đóng" onclick="dgl_delV100.hide();"></p:commandButton>
					</div>
		</p:confirmDialog>
	</h:form>
</h:body>
</html>